const path = require('path')

const fpath = '/images/1.txt'

var fullName = path.basename(fpath)
console.log(fullName)

var fileName = path.basename(fpath, '.txt')
console.log(fileName)